
uniform sampler2D color;
uniform sampler2D shadow;

varying vec2 txt;

void main ()
{
  float blur = 1.0 / 256.0;
  vec4 cmb = vec4 (0.0, 0.0, 0.0, 0.0);
  cmb += texture2D (shadow, txt);
  cmb += 0.25 * texture2D (shadow, txt + vec2 (blur, 0.0));
  cmb += 0.25 * texture2D (shadow, txt + vec2 (0.0, blur));
  cmb += 0.25 * texture2D (shadow, txt - vec2 (blur, 0.0));
  cmb += 0.25 * texture2D (shadow, txt - vec2 (0.0, blur));
  cmb /= 2.0;

  gl_FragColor = texture2D (color, txt) * cmb;
}


